home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 14439 / 14439.xpi / chrome / tabber.jar / content / tabber.xml < prev    next >
Extensible Markup Language  |  2009-10-12  |  2KB  |  68 lines

  1. <?xml version="1.0"?>
  2.  
  3. <bindings id="tabberwocky-bindings"
  4.     xmlns="http://www.mozilla.org/xbl"
  5.     xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  6.     xmlns:xbl="http://www.mozilla.org/xbl">
  7.  
  8. <binding id="tab-label" extends="xul:hbox">
  9.     <content>
  10.         <xul:vbox class="tab-label-inner-box" flex="1">
  11.             <xul:progressmeter
  12.                 class="tab-progress"
  13.                 mode="normal"
  14.                 xbl:inherits="value=tabprogressbar-progress"/>
  15.             <xul:label
  16.                 class="tab-real-text"
  17.                 flex="1"
  18.                 xbl:inherits="value,crop,accesskey"/>
  19.         </xul:vbox>
  20.     </content>
  21.     <implementation>
  22.         <constructor><![CDATA[
  23.             var node = this.parentNode;
  24.             while (node.localName != 'tab')
  25.                 node = node.parentNode;
  26.             node.addEventListener('DOMAttrModified', this.eventHandler, false);
  27.         ]]></constructor>
  28.         <destructor><![CDATA[
  29.             var node = this.parentNode;
  30.             while (node.localName != 'tab')
  31.                 node = node.parentNode;
  32.             node.removeEventListener('DOMAttrModified', this.eventHandler, false);
  33.         ]]></destructor>
  34.         <field name="eventHandler"><![CDATA[
  35.             ({
  36.                 mOwner : this,
  37.                 handleEvent : function(aEvent)
  38.                 {
  39.                     if (aEvent.attrName != 'label') return;
  40.  
  41.                     this.mOwner.setAttribute('value', aEvent.target.getAttribute('label'));
  42.                 }
  43.             })
  44.         ]]></field>
  45.     </implementation>
  46. </binding>
  47.  
  48. <binding id="scrollbar" extends="chrome://global/content/bindings/scrollbar.xml#scrollbar">
  49.     <implementation>
  50.         <constructor><![CDATA[
  51.             if (navigator.platform.indexOf('Mac') != -1)
  52.                 this.initScrollbar();
  53.  
  54.             if (this.orient == 'horizontal')
  55.                 this.parentNode.mHorizontalScrollbar = this;
  56.             else
  57.                 this.parentNode.mVerticalScrollbar = this;
  58.         ]]></constructor>
  59.         <destructor><![CDATA[
  60.             if (this.orient == 'horizontal')
  61.                 this.parentNode.mHorizontalScrollbar = null;
  62.             else
  63.                 this.parentNode.mVerticalScrollbar = null;
  64.         ]]></destructor>
  65.     </implementation>
  66. </binding>
  67.  
  68. </bindings>